{%extends 'index.html'%}

{%block style%}
<style type="text/css">
  header{
    background: #eee;
    font-family: '楷体';
    height: 7rem;
    margin-bottom: 20px;
  }
  header>div>h2{
    line-height: 6rem;
    margin-top: 4px;
  }
  .mydiv{
    margin-bottom: 20px;
  }
</style>
{%endblock%}

{%block content%}
<header>
    <div class="container">
        <h2>所有视频</h2>
    </div>
</header>

<div class="container">
        
        <div class="text-center">
          <table class="table table-bordered text-center">
            
            <thead>
              <tr>
                <th class="text-center">序号</th>
                <th class="text-center">名称</th>
                <th class="text-center">介绍</th>
                <th class="text-center">讲师</th>
                <th class="text-center">播放次数</th>
                <th class="text-center">时长</th>
                <th class="text-center">编辑</th>
                <th class="text-center">删除</th>
                </tr>
            </thead>
            <tbody >
              {%for item in all_videos%}
              <tr >
                <th>{{item.title}}</th>
                <th>1</th>
                <th>{{item.abstract}}</th>
                <th>{{item.t_id}}</th>
                <th>{{item.hits}}</th>
                <th>{{item.time}}</th>
                <th><a href="#"><span class="glyphicon glyphicon-edit"></span></a></th>
                <th><a href="#"><span class="glyphicon glyphicon-trash"></span></a></th>
              </tr>
              {%endfor%}
            </tbody>
          </table>
          <ul class="pagination">
              <li><a href="#">&laquo;</a></li>
          {%for item in range(1,page.pages+1)%}
              
              <li><a href="/video_next_page/{{item}}">{{item}}</a></li>
          {%endfor%}
              <li><a href="#">&raquo;</a></li>
          </ul>
        </div>

</div>

{%endblock%}